package com.rytx.system.service.impl;

import com.rytx.system.domain.ysp.ArtKdCompany;
import com.rytx.system.mapper.ArtKdCompanyMapper;
import com.rytx.system.service.ArtKdCompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ArtKdCompanyServiceImpl implements ArtKdCompanyService {
    @Autowired
    private ArtKdCompanyMapper artKdCompanyMapper;

    @Override
    public List<ArtKdCompany> listAll() {
        return artKdCompanyMapper.selectAll();
    }

    @Override
    public ArtKdCompany getById(Long id) {
        return artKdCompanyMapper.selectById(id);
    }

    @Override
    public int save(ArtKdCompany artKdCompany) {
        return artKdCompanyMapper.insert(artKdCompany);
    }

    @Override
    public int update(ArtKdCompany artKdCompany) {
        return artKdCompanyMapper.update(artKdCompany);
    }

    @Override
    public int delete(Long id) {
        return artKdCompanyMapper.deleteById(id);
    }
}
